<script setup>

</script>

<template>
  <div id="home_header">
    <a-row :wrap="false">
      <a-col flex="250px">
        <router-link to="/">
          <div class="title_bar">
            <img class="logo" src="../assets/logo.png" alt="logo" />
            <div class="title">讯界通览</div>
          </div>
        </router-link>
      </a-col>
      <a-col flex="auto" class="header_middle">
        <a-input-search
          v-model="searchQuery"
          placeholder="搜索资讯"
          @search="onSearch"
          enter-button
          class="header_input"
        />
      </a-col>
      <!-- 用户信息展示栏 -->
      <a-col flex="110px">
        <div>
          <div>
            <a-button type="primary" href="#">登录</a-button>
          </div>
        </div>
      </a-col>
    </a-row>
  </div>
</template>

<style scoped>
#home_header {
  padding-inline: 16px;

  .header_middle {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .header_input{
    max-width: 450px;
    border-radius: 8px;
    margin-inline: 32px;
  }
}

#home_header .title_bar {
  display: flex;
  align-items: center;
  margin-inline: 16px;
}

@media (max-width: 720px) {
  .header_middle .header_input {
    display: none;
  }
}

.title {
  color: black;
  font-size: 18px;
  margin-inline: 12px;
}

.logo {
  height: 48px;
  margin-right: 5px;
}
</style>
